package org.javaboy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.util.UriUtils;

import java.net.URI;
import java.net.URLEncoder;

/**
 * @Author 江南一点雨
 * @Date 2019-05-27 11:13
 */
@Controller
public class HelloController2 {
    @GetMapping("/hello2")
    public String hello(Model model) {
        String name="张三";
        int age=22;
        model.addAttribute("name",name);
        model.addAttribute("age",age);

//        String encodeStr= StringUtils.to
//        String decodeStr=UriUtils.decode(encodeStr,"UTF-8");
        return "hello";
    }
}
